Caculate standard deviation